#import "MainViewCreater.h"
#import "SMViewController.h"
#import "LeftViewController.h"
#import "TabViewController.h"
#import "TeacherViewController.h"
#import "MyClassViewController.h"
#import "TeacherCenterViewController.h"
#import "ClassCameraViewController.h"
#import "SettingsViewController.h"

MainViewCreater * mainViewCreater;

@implementation MainViewCreater

+ (MainViewCreater*)getInstance
{
    if (mainViewCreater == nil) {
        mainViewCreater = [[MainViewCreater alloc]init];
    }
    return mainViewCreater;
}

-(void)destoryMain{
    mainViewCreater = nil;
}

- (UIViewController *)createMainView {
    
    TabViewController *mainViewController = [[TabViewController alloc] init];
    
//    TeacherViewController *teacherViewController = [[TeacherViewController alloc] init];
//    
//    MyClassViewController *myClassViewController = [[MyClassViewController alloc] init];
//    
//    GaleryViewController *galeryViewController = [[GaleryViewController alloc] init];
//    
//    TeacherCenterViewController *teacherCenterViewController = [[TeacherCenterViewController alloc] init];
//    
//    ClassCameraViewController *classCameraViewController = [[ClassCameraViewController alloc] init];
    
//    NSArray *array = @[mainViewController, teacherViewController, myClassViewController,galeryViewController,teacherCenterViewController,classCameraViewController];
    
    NSArray *array = @[mainViewController];
    
    self.leftViewController = [[LeftViewController alloc] init];
    
    SMViewController *smViewController = [SMViewController sharedSMViewController];

    smViewController.leftView = self.leftViewController.view;
    smViewController.viewControllers = array;
    smViewController.showsShadow = YES;
    return smViewController;
}
@end
